﻿@model MvcApplication2.Controllers.Viewmodel.DashboardViewModel
<div class="page-header">
    <h2>
        Tester <small>Riepiloghi e statistiche</small></h2>
</div>
<dl class="dl-horizontal">
    <dt>Esercizi Svolti</dt>
    <dd>
        5</dd>
    <dt>Soldi Guad</dt>
    <dd>
        52 $</dd>
    <dt></dt>
</dl>
<div>
    <p>
        @Html.ActionLink("Search New Exercise", "SearchExercises", "Tester", null, new { @class = "btn btn-primary" })
        @Html.ActionLink("My Exercises", "Messages", "User", null, new { @class = "btn btn-action" })
        @Html.ActionLink("Cronologia Lavori", "ExerciseHistory", null, "Tester", new { @class = "btn btn-action" })
    </p>
</div>
<div class="row well well-large">
    <table class="table table-striped">
        <tr>
            <th>
                Exercise Owner
            </th>
            <th>
                Exercise
            </th>
            <th>
                Reward
            </th>
            <th>
                Status
            </th>
            <th>
            </th>
        </tr>
        @foreach (var item in Model.Works)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Exercise.Owner.DisplayName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Exercise.Title)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Reward)
                </td>
                <td>
                    <span class="label @item.GetLabelClass">@item.GetLocalizedStatusMessage</span>
                </td>
                <td>
                    @*@Html.ActionLink("Details", "Details", new { id = item.UserMessageId }, new { @class = "btn btn-mini" }) . far hyprelink exercise*@
                    @Html.ActionLink("Delete", "DeleteWork", new { id = item.UserMessageId }, new { @class = "btn btn-mini btn-warning" })
                </td>
            </tr>
        }
    </table>
</div>
